package oo

type Person struct {
	name string
	city string
	age  uint8
}


//构造函数
func NewPerson(name, city string, age uint8) *Person {
	return &Person{
		name: name,
		city: city,
		age:  age,
	}
}


// 结构体的方法,要改变对象的属性接收者要用指针
func (p *Person) SetAge(age uint8){
	p.age = age
}














